/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package Ex5_Array_Matrix;

/**
 *
 * @author Root
 */
public class Array {
     public static void main(String[] args) {
        // TODO code application logic here
         Array a=new Array();
        int[] array1 = {2, 3, 5, 7, 11, 13, 19};
        System.out.println("mang 1 la: ");
//        for (int i : array1) {
//            System.out.print(i + "  ");
//
//        }
        a.printArray(array1);

        int[] array2 = array1;
        for (int i = 0; i < array2.length; i++) {
            array2[i] = i;


        }



        System.out.println("");
        System.out.println("mang 2 la");
//        for (int i : array2) {
//            System.out.print(i + "  ");
//
//        }
        a.printArray(array2);
        System.out.println("");
        System.out.println("mang 1 sau khi gan la ");
//        for (int i : array1) {
//            System.out.print(i + "  ");
//
//        }
        a.printArray(array1);



    }
      public void printArray(int[] array) {
        System.out.print('<');
        for (int i = 0; i < array.length; i++) {
            System.out.print(array[i]);
            if ((i + 1) < array.length) {
                System.out.print(" ,  ");

            }

        }
        System.out.println('>');
    }

}
